<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT">










<meta name="description" content="函数依赖部分函数依赖；传递函数依赖 非关系化关系模式可能存在的问题 数据冗余、更新异常（数据不一致）、插入异常、删除异常 关系化关系的用途 解决非关系化模式存在的问题 键相关的概念超键：唯一标识元组，可能存在冗余属性 候选键： 唯一标识元组 超键与候选键的差异 比如：(SNo,SName,SSex) 其中(SNo,SName)超键 主键： 在候选键中任意选择一个作为主键 外键： 其他关系的主键 候">
<meta name="keywords" content="Blog Java Spring">
<meta property="og:type" content="article">
<meta property="og:title" content="数据库---规范化理论、范式、模式分解">
<meta property="og:url" content="http://koude.gitee.io/blog/2017/09/20/数据库---规范化理论、范式、模式分解/index.html">
<meta property="og:site_name" content="JavaKK">
<meta property="og:description" content="函数依赖部分函数依赖；传递函数依赖 非关系化关系模式可能存在的问题 数据冗余、更新异常（数据不一致）、插入异常、删除异常 关系化关系的用途 解决非关系化模式存在的问题 键相关的概念超键：唯一标识元组，可能存在冗余属性 候选键： 唯一标识元组 超键与候选键的差异 比如：(SNo,SName,SSex) 其中(SNo,SName)超键 主键： 在候选键中任意选择一个作为主键 外键： 其他关系的主键 候">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://koude.gitee.io/blog/2017/09/20/images/dn.net-20170919180952573-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png">
<meta property="og:image" content="http://koude.gitee.io/blog/2017/09/20/images/dn.net-20170919181033601-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png">
<meta property="og:image" content="http://koude.gitee.io/blog/2017/09/20/images/dn.net-20170919181610579-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png">
<meta property="og:image" content="http://koude.gitee.io/blog/2017/09/20/images/dn.net-20170919181728752-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png">
<meta property="og:image" content="http://koude.gitee.io/blog/2017/09/20/images/dn.net-20170919182510230-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png">
<meta property="og:image" content="http://koude.gitee.io/blog/2017/09/20/images/dn.net-20170919182552344-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png">
<meta property="og:image" content="http://koude.gitee.io/blog/2017/09/20/images/dn.net-20170919183034683-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png">
<meta property="og:image" content="http://koude.gitee.io/blog/2017/09/20/images/dn.net-20170919183253292-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png">
<meta property="og:image" content="http://koude.gitee.io/blog/2017/09/20/images/dn.net-20170919183630819-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png">
<meta property="og:updated_time" content="2019-03-28T08:52:13.717Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="数据库---规范化理论、范式、模式分解">
<meta name="twitter:description" content="函数依赖部分函数依赖；传递函数依赖 非关系化关系模式可能存在的问题 数据冗余、更新异常（数据不一致）、插入异常、删除异常 关系化关系的用途 解决非关系化模式存在的问题 键相关的概念超键：唯一标识元组，可能存在冗余属性 候选键： 唯一标识元组 超键与候选键的差异 比如：(SNo,SName,SSex) 其中(SNo,SName)超键 主键： 在候选键中任意选择一个作为主键 外键： 其他关系的主键 候">
<meta name="twitter:image" content="http://koude.gitee.io/blog/2017/09/20/images/dn.net-20170919180952573-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Mist',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://koude.gitee.io/blog/2017/09/20/数据库---规范化理论、范式、模式分解/">





  <title>数据库---规范化理论、范式、模式分解 | JavaKK</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">JavaKK</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">Welcome To My Blog</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/blog/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br>
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://koude.gitee.io/blog/blog/2017/09/20/数据库---规范化理论、范式、模式分解/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="JavaKK">
      <meta itemprop="description" content>
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="JavaKK">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">数据库---规范化理论、范式、模式分解</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-09-20T02:38:46+08:00">
                2017-09-19
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p><strong>函数依赖</strong><br>部分函数依赖；传递函数依赖</p>
<p><strong>非关系化关系模式可能存在的问题</strong></p>
<p>数据<strong>冗余</strong>、更新<strong>异常</strong>（数据不一致）、插入异常、删除异常</p>
<p><strong>关系化关系的用途</strong></p>
<p>解决非关系化模式存在的问题</p>
<h2 id="键相关的概念"><a href="#键相关的概念" class="headerlink" title="键相关的概念"></a><strong>键相关的概念</strong></h2><p><strong>超键：</strong><br>唯一标识元组，可能存在冗余属性</p>
<p><strong>候选键：</strong></p>
<p>唯一标识元组</p>
<p><strong>超键与候选键的差异</strong></p>
<p>比如：(SNo,SName,SSex) 其中(SNo,SName)超键</p>
<p><strong>主键：</strong></p>
<p>在候选键中任意选择一个作为主键</p>
<p><strong>外键：</strong></p>
<p>其他关系的主键</p>
<h2 id="候选键的求法"><a href="#候选键的求法" class="headerlink" title="候选键的求法"></a><strong>候选键的求法</strong></h2><p><strong>图示法</strong><br>先把属性转化为结点，把函数依赖转化为<strong>有向箭头</strong><br>再找<strong>入度为0</strong> 的结点开始遍历有向图，若能<strong>遍历全图</strong>则说明该结点就是候选键。<br>若没有入度为0的结点，则选择<strong>既有入度又有出度</strong>的结开始遍历。</p>
<p><strong>求候选键的相关例题</strong></p>
<p><img src="../images/dn.net-20170919180952573-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png" alt="这里写图片描述"></p>
<p><strong>解题过程分析：</strong></p>
<p><img src="../images/dn.net-20170919181033601-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png" alt="这里写图片描述"></p>
<p>先把属性都转<strong>化为结点</strong>，把函数依赖转化为<strong>有向图的边</strong>，再从上图中找到<strong>入度为0</strong>的节点A1，从A1开始遍历有向图，我们发现从A1开始刚好可以<strong>遍历整个有向图</strong>，所以<strong>A1是候选关键字(候选码)</strong>。</p>
<p><img src="../images/dn.net-20170919181610579-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png" alt="这里写图片描述"></p>
<p><strong>解题过程分析：</strong></p>
<p><img src="../images/dn.net-20170919181728752-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png" alt="这里写图片描述"></p>
<p>同理：先把属性都<strong>转化为结点</strong>，把函数依赖都转化为<strong>有向图的边</strong>，我们开始查找图中入度为0的结点，（转化结点的时候需要注意，由<strong>多个属性共同决定</strong>的结点需要把<strong>多个结点聚合</strong>在<strong>一起</strong>后到达目标结点，而<strong>不是</strong>每个结点直接到达目标结点）观察图中入读为0的结点，发现A、B、C、D都是入读为0的结点，由于图示法已经将图分为了<strong>两部分</strong>，而由ABCD四个属性共同组成的候选字可以<strong>遍历整个有向图</strong>。即是，<strong>ABCD是所求</strong></p>
<p><img src="../images/dn.net-20170919182510230-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png" alt="这里写图片描述"></p>
<p><strong>解题过程分析：</strong></p>
<p><img src="../images/dn.net-20170919182552344-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png" alt="这里写图片描述"></p>
<p>前期工作不再赘述，发现图中<strong>没有入度为0</strong>的结点，我们需要找<strong>既有入度又有出度</strong>的结点，C可以直接排除，而AB都是这样的结点，AB都可以<strong>遍历整个有向图</strong>，所以所求为A和B</p>
<h2 id="范式"><a href="#范式" class="headerlink" title="范式"></a>范式</h2><p><img src="../images/dn.net-20170919183034683-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png" alt="这里写图片描述"></p>
<p><strong>第一范式（1NF）</strong></p>
<p>每个分量都是不可再分的数据项，若不是，只需删除可再分项</p>
<p><strong>第二范式（2NF）</strong></p>
<p>在第一范式的基础上，不存在<strong>部分依赖</strong>，单属性主键必定没有部分依赖</p>
<p><strong>第三范式（3NF）</strong></p>
<p>在第二范式的基础上没有<strong>传递依赖</strong></p>
<p><strong>BC范式（BCNF）</strong></p>
<p>每个函数依赖的<strong>左边必须是候选键</strong></p>
<h2 id="模式分解"><a href="#模式分解" class="headerlink" title="模式分解"></a>模式分解</h2><p><strong>保持函数依赖分解</strong><br>原关系的函数依赖全部保留为新的模式</p>
<p><strong>无损（联接）分解</strong></p>
<p>可以还原为原来的表</p>
<p><strong>列表法</strong></p>
<p><img src="../images/dn.net-20170919183253292-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png" alt="这里写图片描述"><br>只要有一行全部为a则该分解为<strong>无损分解</strong>，适用于分解的表为<strong>多表</strong>，第一排为<strong>原表的属性</strong>，第一列为<strong>拆分后的关系模式</strong>，根据<strong>原有的函数</strong>依赖进行<strong>替换</strong>，用<strong>a</strong>表<strong>示已有属性</strong>或者<strong>可以推出的属性</strong>，用b表示<strong>没有的属性</strong></p>
<p><strong>两表法</strong></p>
<p><img src="../images/dn.net-20170919183630819-watermark-2-text-aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbDEzODgxNzg3MDA2-font-5a6L5L2T-fontsize-400-fill-I0JBQkFCMA==-dissolve-70-gravity-SouthEast.png" alt="这里写图片描述"></p>
<p>只适用于<strong>一分为二</strong>的情况，求分解后模式的<strong>交</strong>、各自<strong>差</strong>，若新依赖中<strong>有原有的依赖</strong>则为无损分解</p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
        <div class="post-widgets">
        

        

        
          
          <div id="needsharebutton-postbottom">
            <span class="btn">
              <i class="fa fa-share-alt" aria-hidden="true"></i>
            </span>
          </div>
        
        </div>
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2017/09/20/数据库---关系代数/" rel="next" title="数据库---关系代数">
                <i class="fa fa-chevron-left"></i> 数据库---关系代数
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2017/09/20/数据库---并发控制、完整性约束、数据库安全/" rel="prev" title="数据库---并发控制、完整性约束、数据库安全">
                数据库---并发控制、完整性约束、数据库安全 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">JavaKK</p>
              <p class="site-description motion-element" itemprop="description">Be Better No Ego</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/">
              
                  <span class="site-state-item-count">28</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/blog/categories/index.html">
                  <span class="site-state-item-count">8</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/blog/tags/index.html">
                  <span class="site-state-item-count">21</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/javakk" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:92920@sohu.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="http://www.javakk.cn" target="_blank" title="Resume">
                      
                        <i class="fa fa-fw fa-instagram"></i>Resume</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#键相关的概念"><span class="nav-number">1.</span> <span class="nav-text">键相关的概念</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#候选键的求法"><span class="nav-number">2.</span> <span class="nav-text">候选键的求法</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#范式"><span class="nav-number">3.</span> <span class="nav-text">范式</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#模式分解"><span class="nav-number">4.</span> <span class="nav-text">模式分解</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2015 &mdash; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-snowflake-o"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Powered by JavaKK</span>

  
</div>









        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  
  
  
  <link rel="stylesheet" href="/blog/lib/needsharebutton/needsharebutton.css">

  
  
  <script src="/blog/lib/needsharebutton/needsharebutton.js"></script>

  <script>
    
      pbOptions = {};
      
          pbOptions.iconStyle = "box";
      
          pbOptions.boxForm = "horizontal";
      
          pbOptions.position = "bottomCenter";
      
          pbOptions.networks = "Weibo,Wechat,Douban,QQZone,Twitter,Facebook";
      
      new needShareButton('#needsharebutton-postbottom', pbOptions);
    
    
  </script>

  

  

  

  

</body>
</html>
